package com.feihao.zhou.TCP.demo01;

import java.io.IOException;
import java.io.OutputStream;
import java.net.InetAddress;
import java.net.Socket;

public class Client {
    public static void main(String[] args) throws IOException {
        //创建发送对象
       Socket socket = new Socket( InetAddress.getByName("127.0.0.1"),11111);

       String s = "你好啊啊啊啊啊";
        byte[] bytes = s.getBytes();

        OutputStream outputStream = socket.getOutputStream();
        outputStream.write(bytes);

        socket.close();
        outputStream.close();
    }
}
